<%-- 
    Document   : SetingChangeProcess
    Created on : Mar 24, 2012, 12:47:20 PM
    Author     : Tokino
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>

<%@ page language="java" %>
<%@ page import="java.util.*" %>
<%! 
  
%>



<jsp:useBean id="formChangePassword" class="servlets.PUpdate" scope="request">
  <jsp:setProperty name="formChangePassword" property="*"/>
</jsp:useBean>  
<jsp:useBean id="SecprogScopeSession" class=
"servlets.SecprogScopeSession" scope="session" />

<% 

    if (!SecprogScopeSession.getIsLogin()) {
        response.sendRedirect("../index.jsp");
    }
    if (SecprogScopeSession.getAccounttype() == 1) {
        response.sendRedirect("../customer/CMain.jsp");
    }
    if (SecprogScopeSession.getAccounttype() == 2) {
        response.sendRedirect("../accounting/PCMain.jsp");
    }
    if (SecprogScopeSession.getAccounttype() == 3 || SecprogScopeSession.getAccounttype() == 4 || SecprogScopeSession.getAccounttype() == 5 || SecprogScopeSession.getAccounttype() == 6) {
        response.sendRedirect("../product/PMain.jsp");
    }



   if (formChangePassword.Cpassword(SecprogScopeSession.getUserName())) {
       formChangePassword.setOpassword("");
       formChangePassword.setNpassword1("");
       formChangePassword.setNpassword2("");
       
%>
    <jsp:forward page="PSettings.jsp"/>
<%
 
  }  else {
%>
    <jsp:forward page="PSettings.jsp"/>
<%
   }
%>